<div class="search-upDown"> 
	<a href="${ctxPath}/search" class="search-upDown-btn1"></a>
</div>
<!--搜索条件-->
<div class="search-box clearfloat" id="search-box">
	<div class="search-boxa gary4c">
		<p class="search-boxa1">您已选择：</p>
		<ul class="search-boxa2" id="ul_select_items"></ul>
	</div>
	<div class="search-boxb">
		<ul class="search-boxb-ul">
			<li style="visibility:hidden;"><p class="search-boxb-ul-inp"><input type="text" id="searchKyeword2" class="search-topa2-sp2-inp search-input2" style="border:0 none;width:190px;margin-top:2px;color:#a5a5a5;height:23px;" value="试试别的关键字" onfocus="if(this.value=='试试别的关键字'){this.value='';}this.style.color='#333';" onblur="if(this.value=='') {this.value='试试别的关键字';this.style.color='#A5A5A5';}"/></p></li>
			<li style="visibility:hidden;"><a url="${ctxPath}${result.urls.keyword}" href="javascript:searchFilert();"  class="search-boxb-ul-submit"></a></li>
			<li class="search-boxb-ul-ft">共为你搜索出 <span class="search-boxb-ul-ft2">${result.total}</span>  个商品</li>
		</ul>
	</div>
</div>
<script>
// 城市
appendSelect('${ctxPath}${stringutil.replace(result.urls.cityjx,"all","-",1)}','cityjx');
// 大分类
appendSelect('${ctxPath}${stringutil.replace(stringutil.replace(result.urls.typeajx,"all","-",2),"all","-",3)}','typeajx');
// 小分类
appendSelect('${ctxPath}${stringutil.replace(result.urls.typebjx,"all","-",3)}','typebjx');
/**
 * 时间区间
 */
var bdatetime = $("#section_bdatetime").text();
var edatetime = $("#section_edatetime").text();
if(bdatetime || edatetime){
	var date = '';
	if(bdatetime && edatetime){
		date = bdatetime+'至'+edatetime;
	}else {
		date = bdatetime?bdatetime:edatetime;
	}
	var h = '<li><pre>'+date+'</pre>'
	h += '<a href="${ctxPath}${result.urls.holiday}" class="search-boxa2-dot"></a></li>';
	$("#ul_select_items").append(h);
}else {
	// 节日
	appendSelect('${ctxPath}${result.urls.holiday}','holiday');
	var text = $("#section_holiday").text();
	if(text){
		$("#text_search_holiday").html('<input type="text" class="search-topa2-sp2-inp search-input1" style="border:0 none;height:23px;" readonly="readonly" value="'+$("a:[holiday="+text+"]").text()+'" />');
	}
}
// keyword
var text = $("#section_keyword").text();
if(text != null && text != ''){
	var h = '<li><pre>'+text+'</pre>';
	var url = '${result.urls.keyword}';
	if(url.endWith('&') || url.endWith('?')){
		url = url.substring(0, url.length-1);
	}
	h += '<a href="${ctxPath}'+url+'" class="search-boxa2-dot"></a></li>';
	$("#ul_select_items").append(h);
}
function appendSelect(url,key){
	var text = $("#section_"+key).text();
	if(text != null && text != ''){
		if(url.endWith('&') || url.endWith('?')){
			url = url.substring(0, url.length-1);
		}
		var h = '<li><pre>';
		h += $("a:["+key+"="+text+"]").text();
		h += '</pre>';
		h += '<a href="'+url+'" class="search-boxa2-dot"></a></li>';
		$("#ul_select_items").append(h);
	}
}
function searchFilert(){
	var t = $("#searchKyeword2").val();
	if(t && t != ''){
		location.href = $(".search-boxb-ul-submit").attr("url")+'keyword='+encodeURI(t);
		return false;
	}
	location.href = $(".search-boxb-ul-submit").attr("url");
}
</script>
<div class="search-cont clearfloat">
	<div class="search-cont-top clearfloat">
		<ul class="search-cont-topul">
			<li class="search-cont-top-li1" style="width:300px;">排序方式：
			  	<a class="<%if(result.params["orderstype"] == null){%>c4 <%}%>ml15" href="${ctxPath}${result.urls.orderstype}">默认</a>
				<a class="<%if(result.params["orderstype"] == "update"){%>c4 <%}%>ml15" href="${ctxPath}${result.urls.orderstype}orderstype=update">最近更新</a>
				<a class="<%if(result.params["orderstype"] == "play"){%>c4 <%}%>ml15" href="${ctxPath}${result.urls.orderstype}orderstype=play">最近演出时间</a>
			</li>
			<li class="search-cont-top-li2">搜索结果筛选：</li>
			<li>
				<p class="search-cont-inputp">
					<%
					if(result.params.filter != null){
						switch(result.params.filter){
						case "0":
							print("低价稀缺票");
							break;
						case "1":
							print("支持在线选座");
							break;
						case "2":
							print("支持票享无忧");
							break;
						case "3":
							print("支持电子票");
							break;
						}
					}
					%>
				</p>
			</li>
			
		</ul>
	</div>
</div>
<!--结果筛选-->
<div class="search-holiday results">
	<ul>
		<li><a href="${ctxPath}${result.urls.filter}">全部商品</a></li>
		<li><a href="${ctxPath}${result.urls.filter}filter=0" >低价稀缺票</a></li>
		<li><a href="${ctxPath}${result.urls.filter}filter=1" >支持在线选座</a></li>
		<li><a href="${ctxPath}${result.urls.filter}filter=2" >支持票享无忧</a></li>
		<li><a href="${ctxPath}${result.urls.filter}filter=3" >支持电子票</a></li>
	</ul>
</div>
<div class="search-cont clearfloat">
<div class="search-cont-list" id="search-cont-list">
	<div>
		<div id="pages">
			<%include("/search/result.html",{}){}%>
			<ul><li class="search-ajaxLoad-b">
			<%if(result.total != 0){%>
				<div class="num">
					<%var navNum = 5+1;var url = result.urls.pageNum+"pageNum=";%>
					<#pageBar curPage="${result.curPage}" countpages="${result.countpages}" pageSize="${result.pageSize}" url="${url}" navNum="${navNum}"/>
				</div>
			<%}%>
			</li></ul>
		</div>
	</div>
</div>
</div>